package com.chhlz.module.base.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="dish_unit")
@DynamicUpdate(true)
@DynamicInsert(true)
public class DishUnit implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6787034403893537964L;
	private int duId;
	private String duName;
	private String description;
	
	@Id
	@Column(name="du_id", nullable=false)
	@GeneratedValue(generator = "generator") 
	@GenericGenerator(name = "generator", strategy = "increment") 
	public int getDuId() {
		return duId;
	}
	public void setDuId(int duId) {
		this.duId = duId;
	}
	
	@Column(name="du_name")
	public String getDuName() {
		return duName;
	}
	public void setDuName(String duName) {
		this.duName = duName;
	}
	
	@Column(name="description")
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@Override
	public String toString() {
		return "DishUnit [duId=" + duId + ", duName=" + duName
				+ ", description=" + description + "]";
	}

}
